Promise.resolve('foo')
  .then(value => {
    console.log(value); // foo
  })

var promise = new Promise(function (resolve, reject) {
  resolve('foo2');
});
var promise2 = Promise.resolve(promise);
console.log(promise2 === promise); // true

Promise.resolve({
  then: function (onFulfilled, onRejected) {
    onFulfilled('foo3');
  }
})
.then(function (value) {
  console.log(value); // foo3
})

Promise.reject('foo4')
  .catch(function (error) {
    console.log('foo4'); // foo4
  })